import request from '@/utils/request'

// 查询销售列表
export function listSale(query) {
  return request({
    url: '/project/sale/list',
    method: 'get',
    params: query
  })
}

// 管家婆出库单
export function gjpListSale(query) {
  return request({
    url: '/project/sale/gjpSaleList',
    method: 'get',
    params: query
  })
}

// 商务 销售负责人 财务 项目经理 总经理 可以看成本
export function viewCostPermisson(query) {
  return request({
    url: '/project/sale/viewCostPermisson',
    method: 'get',
    params: query
  })
}



// 管家婆出库单 正式清单的选项
export function gjpAllListSale(query) {
  return request({
    url: '/project/sale/gjpAllSaleList',
    method: 'get',
    params: query
  })
}



// 查询销售详细
export function getSale(id) {
  return request({
    url: '/project/sale/' + id,
    method: 'get'
  })
}

// 新增销售
export function addSale(data) {
  return request({
    url: '/project/sale',
    method: 'post',
    data: data
  })
}


export function exportData(data) {
  return request({
    url: '/project/sale/export',
    method: 'post',
    data: data
  })
}

// 修改销售
export function updateSale(data) {
  return request({
    url: '/project/sale',
    method: 'put',
    data: data
  })
}

// 删除销售
export function delSale(id) {
  return request({
    url: '/project/sale/' + id,
    method: 'delete'
  })
}
